<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/sys_include.jsp"%>


<div style="width:640px; padding:8px;">
   <form id="sysuser_resetpw_form" name="sysuser_resetpw_form" method="POST">
      <div style="height: 400px;">
         <div id="sysuser_resetpw_errmsg"></div>

         <fieldset>
            <legend>重置系统管理用户密码</legend>
            <table width="50%" align="center">
               <tr>
                  <td align="right">当前密码：</td>
                  <td align="left"><input id="sysuser_resetpw_user" name="sysuser_resetpw_user" type="text" value="" /></td>
               </tr>
               <tr>
                  <td align="right">新密码：</td>
                  <td align="left"><input id="sysuser_resetpw_passwd" name="sysuser_resetpw_passwd" type="password" value="" /></td>
               </tr>
            </table>
         </fieldset>
         
         <br/>
         
         <div style="text-align: center">
            <input type="button" id="sysuser_resetpw_submit_btn" value="修　改"/>&nbsp;&nbsp;
            <input type="reset" value="重　置"/>
         </div>

      </div>
   </form>
</div>



<script>
   $('#sysuser_resetpw_submit_btn').unbind('click');
   $('#sysuser_resetpw_submit_btn').click(function()
   {
      fun_sysuser_resetpw_submit_btn();
   });

   function fun_sysuser_updatepw_submit_btn()
   {
      var sysuserJson = "{'userPasswd':'" + $('#sysuser_resetpw_passwd').val() + 
    	   "', 'userAccount':'" + $('#sysuser_resetpw_user').val() + "'}";
    	   
      $.ajax(
      {
         type : "POST",
         url : "system/SysUser/resetSysUserPassword.do",
         data :
         {
        	   sysuserJson : sysuserJson
         },
         dataType : "json",
         contentType : "application/x-www-form-urlencoded; charset=UTF-8",
         success : function(json)
         {
            if(json.success)
            {
               $('#sysuser_resetpw_passwd').val('');
               $('#sysuser_resetpw_user').val('');
               $.messager.alert('操作提示', json.msg);
            }
            else
            {
               $.messager.alert('操作提示', json.msg);
            }
            
            // colseTab();
         }
      });
      
      $('#sysuser_resetpw_form')[0].reset();
   }
   
</script>